<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Scope</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Chapter 1. Phoenix 3.2.0">
<link rel="up" href="../modules.html" title="Modules">
<link rel="prev" href="object/casts.html" title="Casts">
<link rel="next" href="scope/local_variables.html" title="Local Variables">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="object/casts.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../modules.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="scope/local_variables.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="phoenix.modules.scope"></a><a class="link" href="scope.html" title="Scope">Scope</a>
</h3></div></div></div>
<div class="toc"><dl class="toc">
<dt><span class="section"><a href="scope/local_variables.html">Local Variables</a></span></dt>
<dt><span class="section"><a href="scope/let.html">let</a></span></dt>
<dt><span class="section"><a href="scope/lambda.html">lambda</a></span></dt>
</dl></div>
<p>
        Up until now, the most basic ingredient is missing: creation of and access
        to local variables in the stack. When recursion comes into play, you will
        soon realize the need to have true local variables. It may seem that we do
        not need this at all since an unnamed lambda function cannot call itself
        anyway; at least not directly. With some sort of arrangement, situations
        will arise where a lambda function becomes recursive. A typical situation
        occurs when we store a lambda function in a <a href="http://www.boost.org/libs/function" target="_top">Boost.Function</a>,
        essentially naming the unnamed lambda.
      </p>
<p>
        There will also be situations where a lambda function gets passed as an argument
        to another function. This is a more common situation. In this case, the lambda
        function assumes a new scope; new arguments and possibly new local variables.
      </p>
<p>
        This section deals with local variables and nested lambda scopes.
      </p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2002-2005, 2010, 2014, 2015 Joel de Guzman, Dan Marsden, Thomas
      Heller, John Fletcher<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="object/casts.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../modules.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="scope/local_variables.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
